<!doctype html>
<html lang="en">
 <head> 
  <meta charset="UTF-8"> 
  <meta name="description" content="燎火的个人博客"> 
  <meta name="keyword" content="燎火,qq799378666,软件开发,java,c#,js,html,html5,css"> 
  <title>燎火的个人博客</title> 
  <script src="/js/jquery-1.11.1.min.js"></script> 
  <script src="/js/bootstrap-3.3.5/js/bootstrap.js"></script> 
  <link href="/js/bootstrap-3.3.5/css/bootstrap.css" rel="stylesheet"> 
  <script src="/js/base.js"></script> 
  <script src="/js/nav.js" flag="article"></script> 
  <script src="/js/jquery.toTop.min.js"></script> 
 </head> 
 <body class="container"> 
  <div class="navbar-form navbar-left" role="search"> 
   <div class="form-group"> 
    <input style="width: 250px;" id="keyWord" type="text" class="form-control" placeholder="搜索关键字" oninput="searchSubmit()" autoComplete="off"> 
   </div> 
  </div> 
  <table id="table_articleList" class="table table-hover table-striped"> 
   <thead> 
    <tr> 
     <th>文章标题</th> 
     <th style="width:180px;">发表时间</th> 
    </tr> 
   </thead> 
   <tbody id="tbody_articleList">
    <tr>
     <td><a target="_blank" href="/article/articleItem/article_8.html">教你如何快速搭建我的世界（Minecraft）服务器</a></td>
     <td>2017-01-15 14:15</td>
    </tr>
    <tr>
     <td><a target="_blank" href="/article/articleItem/article_7.html">自定义ExtJS控件之Ext下拉树和Ext下拉表格</a></td>
     <td>2017-01-15 14:14</td>
    </tr>
    <tr>
     <td><a target="_blank" href="/article/articleItem/article_6.html">Maven最佳实践：管理依赖</a></td>
     <td>2017-01-15 14:12</td>
    </tr>
    <tr>
     <td><a target="_blank" href="/article/articleItem/article_5.html">shiro入门实例</a></td>
     <td>2017-01-15 14:11</td>
    </tr>
    <tr>
     <td><a target="_blank" href="/article/articleItem/article_4.html">Spring MVC 教程,快速入门,深入分析</a></td>
     <td>2017-01-15 14:10</td>
    </tr>
    <tr>
     <td><a target="_blank" href="/article/articleItem/article_3.html">数据导出为excel，用注解实现</a></td>
     <td>2017-01-15 14:08</td>
    </tr>
    <tr>
     <td><a target="_blank" href="/article/articleItem/article_2.html">Hibernate 参数设置一览表</a></td>
     <td>2017-01-15 14:06</td>
    </tr>
    <tr>
     <td><a target="_blank" href="/article/articleItem/article_1.html">利用全注解实现ssh的一个完整例子</a></td>
     <td>2017-01-15 14:05</td>
    </tr>
   </tbody> 
  </table> 
  <nav id="pages" class="navbar-right"> 
   <ul class="pagination"> 
    <li id="page_pre"><a href="/article/articleList/articleList.html">«</a></li> 
    <li class=""><a href="/article/articleList/articleList.html">1</a></li>
    <li class="active"><a href="/article/articleList/articleList_2.html">2</a></li>
    <li id="page_next" class="disabled"><a href="#">»</a></li> 
   </ul> 
  </nav> 
  <script>
      $.get("/article/articleList.json?r="+Math.random(),function(result){
          window.articleList = result;
          var keyWord = $("#keyWord").val().toLowerCase();
          if(keyWord){
              searchSubmit();
          }
      });

      function searchSubmit(){
          var keyWord = $("#keyWord").val().toLowerCase().trim();
       /*   if(!keyWord){
        window.location.reload();
        return;
        }*/

          var list = [];
          for(var i=0;i<articleList.list.length;i++){
              var article = articleList.list[i];
              if(article.title.toLowerCase().indexOf(keyWord)!=-1){
                  list.push(article);
              }
          }
          var str = "";
          for(var i=0;i<list.length;i++){
              var article = list[i];
              var ct = new Date(article.createTime).Format("yyyy-MM-dd HH:mm");
              str+="<tr><td><a href='/article/articleItem/article_"+article.id+".html'>"+article.title+"</a></a></td><td>"+ct+"</td></tr>"
          }
          $("#tbody_articleList").html(str);


          $("#pages").hide();

      }

  </script>  
 </body>
</html>